package controlador;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import vista.VDetallePoliza;
import vista.VPoliza;

public class CVDetallePoliza implements ActionListener {
	private VDetallePoliza vDetallePoliza;
	
	public CVDetallePoliza(String Codigo) {
		super();
		this.vDetallePoliza = new VDetallePoliza(Codigo);
		this.vDetallePoliza.addListener(this);
		this.vDetallePoliza.setVisible(true);
		
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		if (e.getActionCommand().equalsIgnoreCase("Agregar")){
			
		}else if (e.getActionCommand().equalsIgnoreCase("Cancelar")){
			vDetallePoliza.limpiar();
		}else if (e.getActionCommand().equalsIgnoreCase("Salir")){
			vDetallePoliza.dispose();
			
		}

	}

}
